﻿#include "OperSubSystemFreeSideCheck.h"

#include "GUIFrame/MainWindow.h"
#include "GUIFrame/CentralWidget.h"
#include "PickDataProvider/PickedDataProvider.h"
#include "PickDataProvider/PickedData.h"
#include "OperatorsInterface/GraphEventOperator.h"

#include <QAction>


namespace ModelOper
{

    bool OperSubSystemFreeSideCheck::execGUI()
    {
        QAction* action = dynamic_cast<QAction*>(_emitter);
        if (!action)return false;
        bool isVisility = action->isChecked();
        EventOper::GraphEventOperator* graphOper = FITKOPERREPO->getOperatorT<EventOper::GraphEventOperator>("GraphPreprocess");
        if (graphOper == nullptr)return false;
        graphOper->setSEAFreeEdgesVisibility(isVisility);
        return true;
    }

    bool OperSubSystemFreeSideCheck::execProfession()
    {
        return true;
    }
}

